package OOAE_UWE.Assessment;

public class StandardRentalFactory extends RentalAgreementFactory {
    @Override
    protected RentalAgreement createRentalAgreement(Room room) {
        try {
            validateRoomCondition(room);//valid room state
        } catch (InvalidConditionException e) {
            throw new RuntimeException(e);
        }
        return new RentalAgreementImpl(room,this.student,this.startDate,this.endDate);
    }
}






